-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add propagate shapes action #8044
Conversation
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis update introduces the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as CVAT UI
participant Core as CVAT Core
User->>UI: Opens annotations modal
UI->>Core: Initialize PropagateShapes action
Core->>UI: Provide frame selection options
User->>UI: Select frame range and shapes to propagate
UI->>Core: Call propagateShapes function with selected frames and shapes
Core->>UI: Return propagated shapes data
UI->>User: Display updated shapes on frames
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- changelog.d/20240619_102529_klakhov_propagate_shapes_simultaneously.md (1 hunks)
- cvat-core/package.json (1 hunks)
- cvat-core/src/annotations-actions.ts (6 hunks)
- cvat-core/src/object-utils.ts (2 hunks)
- cvat-ui/package.json (1 hunks)
- cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx (9 hunks)
- cvat-ui/src/cvat-core-wrapper.ts (3 hunks)
Files skipped from review due to trivial changes (3)
- changelog.d/20240619_102529_klakhov_propagate_shapes_simultaneously.md
- cvat-core/package.json
- cvat-ui/package.json
Additional comments not posted (7)
cvat-ui/src/cvat-core-wrapper.ts (2)
40-40
: Ensure that the new imports are used appropriately in the file.
99-99
: The export ofFrameSelectionType
aligns with the new functionality added. Ensure that it is utilized where necessary.cvat-core/src/annotations-actions.ts (2)
12-12
: The introduction ofPropagateShapes
andFrameSelectionType
is well-implemented. Ensure the new methods and properties are correctly utilized across the system to maintain consistency.Also applies to: 41-44, 98-135
157-157
: Registration of thePropagateShapes
action is crucial for enabling the new functionality. Verify that this action is properly integrated into the system workflow.Verification successful
The
PropagateShapes
action is registered within thecvat-core/src/annotations-actions.ts
file and appears to be properly integrated into the system. The registration is found at line 157, and the class definition is also present in the same file. This confirms that the action is both defined and registered correctly.
cvat-core/src/annotations-actions.ts
:registerAction(new PropagateShapes());
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of PropagateShapes action into the system workflow. # Test: Search for usages of registered actions. Expect: PropagateShapes to be included. rg --type typescript $'registerAction'Length of output: 72
Script:
#!/bin/bash # Description: Verify the integration of PropagateShapes action into the system workflow. # Correct the file type and search for the registration of actions. rg 'registerAction' --type ts # Search for the usage of PropagateShapes in the codebase. rg 'PropagateShapes' --type tsLength of output: 914
cvat-core/src/object-utils.ts (1)
361-391
: The implementation ofpropagateShapes
appears robust. Ensure that the function handles edge cases and that the shapes' integrity is maintained during propagation.cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx (2)
113-124
: The implementation of frame selection using theFrameSelectionType
is correctly handled in the reducer. Ensure that this logic correctly updates the UI based on the selected frame.
238-244
: The dynamic setting of frame count in theInputNumber
component is a good use of state. Ensure the frame count is accurately retrieved and updated.
changelog.d/20240619_102529_klakhov_propagate_shapes_simultaneously.md
Outdated
Show resolved
Hide resolved
…om/cvat-ai/cvat into kl/propagate-shapes-simultaneously
cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx
Outdated
Show resolved
Hide resolved
cvat-ui/src/components/annotation-page/annotations-actions/annotations-actions-modal.tsx
Outdated
Show resolved
Hide resolved
I am not sure, that copies in both cases are correct, but the second case creates more issues, not allowing to export task. |
Also, please, add tests to cover found issues. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #8044 +/- ##
===========================================
+ Coverage 83.62% 83.63% +0.01%
===========================================
Files 383 383
Lines 40439 40503 +64
Branches 3815 3831 +16
===========================================
+ Hits 33817 33875 +58
- Misses 6622 6628 +6
|
In default propagate we use
Fixed
Fixed as discussed (cropMask if needed in Also added tests for default propagate aciton, action on current frame and mask case |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation and context
The PR adds new action
Propagate shapes
that allows to propagate all filtered shapes on the current frame simultaneouslyHow has this been tested?
Manual testing
Checklist
develop
branch[ ] I have linked related issues (see GitHub docs)(cvat-canvas,
cvat-core,
cvat-data and
cvat-ui)
License
Feel free to contact the maintainers if that's a concern.
Summary by CodeRabbit
New Features
Updates
cvat-core
to15.0.7
andcvat-ui
to1.63.12
indicating a new release.Enhancements